<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
            <!-- <button onclick='handleClick(this)'>点击我啊</button> -->
            <button id="btn">点击我啊</button>
            <a href="http://www.bing.com" id="bing">bing</a>
    </div>
    <script>
        // function handleClick(e){
        //     // console.log(arguments);
        //     console.log(e);
        //     // e.stopPropagation();// 阻止事件的冒泡的行为
        // }
        document.getElementById("btn").addEventListener("click",function(e){
                e.stopPropagation();// 阻止事件的冒泡的行为
                console.log("原生的点击事件触发了");
        })
        document.getElementById("app").addEventListener("click",function(){
            console.log("div 被触发了");
        })
        document.getElementById("bing").addEventListener("click",function(e){
            e.preventDefault();// 阻止默认行为
        })
    </script>
</body>
</html>